package com.myproject.service;

import com.myproject.mapper.EmployeeMapper;
import com.myproject.pojo.Employee;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class EmployeeServiceImpl implements EmployeeService{
    @Autowired
    private EmployeeMapper employeeMapper;


    @Override
    public List<Employee> queryAll() {
        return employeeMapper.queryAll();
    }

    @Override
    public Employee queryById(int id) {
        return employeeMapper.queryById(id);
    }

    @Override
    public Boolean saveEmp(Employee employee) {
        return employeeMapper.saveEmp(employee);
    }

    @Override
    public Boolean deleteEmp(int id) {
        return employeeMapper.deleteEmp(id);
    }
}
